package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.TravelContent;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ITravelService {

    PageInfo query(QueryObject qo);

    void saveOrUpdate(Travel travel);

    Travel getTravelById(Long id);

    void updateState(Travel travel);

    TravelContent getTravelContentById(Long id);

    Integer queryLikeCount(Long travelId);

    Integer queryIfexist(Long travelId, Long userId);

    void saveLike(Long userId, Long travelId);

    void deleteLike(Long userId, Long travelId);

    PageInfo<List<Map>> queryForLikeMe(TravelQueryObject qo);


    List<Travel> listAll();

    Travel selectStrategyByTitle(String title);

    List<String> searchTitle();

    void updateBrowse(Long id);
}
